
import 'package:logger/logger.dart';

/// 输出Log工具类
class Log {
  static late Logger logger;
  static init(){
    logger = Logger(
      printer: PrettyPrinter(
          methodCount: 3, // number of method calls to be displayed
          errorMethodCount: 8, // number of method calls if stacktrace is provided
          lineLength: 120, // width of the output
          colors: true, // Colorful log messages
          printEmojis: false, // Print an emoji for each log message
          printTime: false // Should each log print contain a timestamp
      ),
    );
  }


  static void d(dynamic message){
    logger.d(message);
  }


  static void v(dynamic message){
    logger.d(message);
  }

  static void i(dynamic message){
    logger.i(message);
  }

  static void w(dynamic message){
    logger.w(message);
  }


  static void e(dynamic message){
    logger.e(message);
  }
}